<?php
/* @var $this NavigationController */
/* @var $model Navigation */
/* @var $form CActiveForm */
?>

<div class="row">

<?php $form=$this->beginWidget('CActiveForm', 
      array("id"=>'navigation-form',
      'enableClientValidation'=>true,
      'clientOptions'=>array(
        'validateOnSubmit'=>true,
      ),
      "htmlOptions"=>array(
          "class"=>"form-horizontal")
    )); ?>

	<?php echo $form->errorSummary($model,null,null,array("class"=>'alert alert-error')); ?>


	<div class="control-group">
		<?php echo $form->labelEx($model,'parentid',array('class'=>'control-label')); ?>
		<div class="controls">
			<?php echo $form->dropDownList($model,'parentid', array_merge(array('0'=>'一级栏目'), $listdata) ) ?>
		</div>
		<?php  $form->error($model,'parentid'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'title',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model,'title'); ?>
		</div>
		<?php  $form->error($model,'title'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'url',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model,'url'); ?>
		</div>
		<?php  $form->error($model,'url'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'sort',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model,'sort',array("class"=>'input-mini')); ?>
		</div>
		<?php  $form->error($model,'sort'); ?>
	</div>

	

	<div class="control-group">
		<div class="controls">
			<?php echo CHtml::submitButton($model->isNewRecord ? '添加' : '修改',array('class'=>'btn')); ?>
			<?php echo CHtml::Button('返回',array('onclick'=>"location.href='".$this->createUrl("index")."'",'class'=>'btn')); ?>
		</div>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->